<?php
namespace app\admin\model;

use think\Model;

class AmModel extends Model
{

    protected  $table =['qc_index'];


       /**
     * 文章模型关联表
     */
    public function cid()
    {
        return $this->hasOne('addonarticle', 'aid', 'id');
    }


    /**
     * 文章模型关联表
     */
    public function mid()
    {
        return $this->hasOne('addonarticle', 'aid', 'id');
    }



    /**
     * 文章模型关联表
     */
    public function tid ()
    {
        return $this->hasOne('addonarticle', 'aid', 'id');
    }





    public function getStatusTurnAttr($value, $data)
    {
        $turnArr = [0=>lang('status0'), 1=>lang('status1')];
        return $turnArr[$data['status']];
    }
}